From: Richard M. Stallman Date: Fri, 7 Jan 1994 05:37:31 +0000 (+0000) Subject: (make-lucid-menu-keymap): Allow multiple identical inactive strings. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~93583 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=b69f3ab1c817320aeb32496dc0170d518c1533d8;p=emacs.git (make-lucid-menu-keymap): Allow multiple identical inactive strings. --- diff --git a/lisp/emacs-lisp/lmenu.el b/lisp/emacs-lisp/lmenu.el index d06b4d56fee..55cef190538 100644 --- a/lisp/emacs-lisp/lmenu.el +++ b/lisp/emacs-lisp/lmenu.el @@ -79,8 +79,12 @@ (if (symbolp callback) (fset command callback) (fset command (list 'lambda () '(interactive) callback))))) - (if name - (define-key menu (vector (intern name)) (cons name command)))) + (if (null command) + ;; Handle inactive strings specially--allow any number + ;; of identical ones. + (setcdr menu (cons (list nil name) (cdr menu))) + (if name + (define-key menu (vector (intern name)) (cons name command))))) (setq menu-items (cdr menu-items))) menu))